package com.sloth.service;

import com.sloth.pojo.Customer;
import com.sloth.util.ServerResponse;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.security.PrivateKey;

/**
 * @author lai
 * @time 2021/10/6 9:03
 */
public interface CustomerService {

    public Customer getByCustomerId(Integer customerId);

    public ServerResponse login(String username, String password,HttpServletRequest request,HttpServletResponse response);

    public ServerResponse register(Customer customer);


    public ServerResponse getPublicKey();

    public String getPrivateKey();

    // 身份证转base64 调用接口
    public Object getPersonCard(MultipartFile multipartFile);

    // 添加用户
    public void createCustomer(int count);

    //根据 customerTicket 获取customer
    public Customer getCustomerByCookie(String customerTicket, HttpServletRequest request, HttpServletResponse response);


}